We will mainly focus today on methods for analyzing and forecasting regular time-series data with seasonality patterns
By the end of this workshop, you probably won’t become an expert in time series analysis and forecasting, but you will be able to:
All today’s slides, code, and rmarkdown files are available on GitHub
Downloading the workshop material from the terminal:
git clone https://github.com/RamiKrispin/Time-Series-Workshop.git
Or lunch it from a docker container:
Time series analysis is commonly used in many fields of science, such as economics, finance, physics, engineering, and astronomy. The usage of time series analysis to understand past events and to predict future ones did not start with the introduction of the stochastic process during the past century. Ancient civilizations such as the Greeks, Romans, or Mayans, researched and learned how to utilize cycled events such as weather and astronomy to predict future events.
Time series analysis - is the art of extracting meaningful insights from time-series data to learn about past events and to predict future events.
This process includes the following steps:
Generally, in R this process will look like this:
Of course, there are more great packages that could be part of this process such as zoo, xts, bsts, forecastHybird, TSstudio, etc.
Time series data - is a sequence of values, each associate to a unique point in time that can divide to the following two groups:
Note: typically, the term time series data referred to regular time-series data. Therefore, if not stated otherwise, throughout the workshop the term time series (or series) refer to regular time-series data
With time series analysis, you can answer questions such as:
There are multiple classes in R for time-series data, the most common types are:
ts class for regular time-series data, and mts class for multiple time seires objects , the most common class for time series dataxts and zoo classes for both regular and irregular time series data, mainly popular in the financial fieldtsibble class, a tidy format for time series data, support both regular and irregular time-series dataA typical time series object should have the following attributes:
Where the frequency of the series represents the units of the cycle. For example, for monthly series, the frequency units are the month of the year, and the cycle units are the years. Similarly, for daily series, the frequency units could be the day of the year, and the cycle units are also the years.